import java.util.*;
class Solution1{
    public static String NumberToChinese(int num)
    {
        String result = "";
        if (num == 0)
        {
            return "零";
        }
        int _num = num;
        String[] chn_str = new String[] { "零","壹","贰","叁","肆","伍","陆","柒","捌","玖"};
        String[] unit_value = new String[] { "", "拾", "佰", "仟" };
        // String[] chn_str = new String[] { "零","一", "二", "三", "四", "五", "六", "七", "八", "九" };
        String[] section_value = new String[] { "","万","亿","兆"};
        // String[] unit_value = new String[] { "", "十", "百", "千" };
        int section = _num % 10000;
        for (int i = 0; _num != 0 && i < 4; i++)
        {
            if (section == 0)
            {
                //0不需要考虑节权值，不能出现连续的“零”
                if (result.length() > 0 && !result.substring(0, 1).equals("零"))
                {
                    result = "零" + result;
                }
                _num = _num / 10000;
                section = _num % 10000;
                continue;
            }
            result = section_value[i]+result;
            int unit = section % 10;
            for (int j = 0; j<4 ; j++)
            {
                if (unit == 0)
                {
                    //0不需要考虑位权值，不能出现联系的“零”，每节最后的0不需要
                    if (result.length() > 0 && !result.substring(0, 1) .equals("零") && !result.substring(0, 1) .equals(section_value[i]))
                    {
                        result = "零" + result;
                    }
                }
                else
                {
                    result = chn_str[unit] + unit_value[j] + result;
                }
                section = section / 10;
                unit = section % 10;
            }
            _num = _num / 10000;
            section = _num % 10000;
        }
        if (result.length() > 0 && result.substring(0, 1).equals( "零"))
        {
            //清理最前面的"零"
            result = result.substring(1);
        }
        return result;
    }
    public static String transform(String text){
        int index=text.indexOf("元");;
        while (index>=0){
            int right=index,left=right-1;
            while (Character.isDigit(text.charAt(left))){
                left--;
            }
            left++;
            String s = NumberToChinese(Integer.parseInt(text.substring(left, right)));
            text=text.substring(0,left)+s+"圆"+text.substring(right+1);
            index=text.indexOf("元");
        }
        return text;
    }

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        
        String text=sc.nextLine();
        System.out.println(transform(text)); 
        sc.close();
    }
}
// "本次采购的商品有110件”，采购的价格为0元的10件属于赠送商品，采购价格为9999元的100件是实际购买商品，本次采购总价为999900元。"